/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data.DAO;

import data.pojo.Order;
import java.io.File;
import java.util.List;

/**
 *
 * @author 伯乐
 */
public class IOrderStore implements Data.DAO.IDataStore{

    final String fileName = "OrderList.txt";
    Data.DAO.IDataStore ds;

    public IOrderStore() {
        ds = new Data.DAO.DataStore(Order.class, new File(fileName));
    }

    public void add(List list) {
        ds.add(list);
    }

    public List getObjects() {
        return ds.getObjects();

    }

    public List getObjectsByAttr(String key, String value) {
        return ds.getObjectsByAttr(key, value);
    }

    public void deleteByIndex(int[] index) {
        ds.deleteByIndex(index);
    }

    public List searchObjectsByAttr(String key, String regexp) {
        return ds.searchObjectsByAttr(key, regexp);
    }

    public void update(List list) {
        ds.update(list);
    }
}
